package com.gzhryc.net_marketing.core.enums;

public enum EGoodsState {

    PutOnTheShelf(1, "上架"),OffTheShelf(2, "下架"), NoInventory(3, "无库存"), Delete(4, "已删除");

    private Integer index;
    private String note;

    EGoodsState(Integer index, String note) {
        this.index = index;
        this.note = note;
    }

    public Integer index() {
        return index;
    }

    public String note() {
        return note;
    }

    public static String note(Integer index) {
        EGoodsState[] temp = EGoodsState.values();
        for (int i = 0; i < temp.length; i++) {
            EGoodsState item = temp[i];
            if (item.index.equals(index)) {
                return item.note;
            }
        }
        return null;
    }
}
